FROM golang:1.17.2

ENV APP_NAME webserver
ENV PORT 8081

COPY . /opt/go/${APP_NAME}
WORKDIR /opt/go/${APP_NAME}

RUN go build -o ${APP_NAME}

CMD ./${APP_NAME}

EXPOSE ${PORT}
